<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="avicit.platform6.core.locale.PlatformLocalesJSTL" %>
<%@page import="java.util.Locale" %>
<%@page import="avicit.platform6.api.session.SessionHelper" %>
<%@ page import="avicit.platform6.commons.utils.ViewUtil" %>
<%@ page import="avicit.platform6.commons.utils.ComUtil" %>
<%@ taglib prefix="sec" uri="/WEB-INF/tags/shiro.tld" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <base href="<%=ViewUtil.getRequestPath(request)%>">
    <%@page import="avicit.platform6.api.sysshirolog.impl.AfterLoginSessionProcess" %>
    <%
        Object lang = session
                .getAttribute(AfterLoginSessionProcess.SESSION_CURRENT_LANGUAGE_CODE);
        String languageCode = "zh_CN";
        if (lang != null) {
            languageCode = lang.toString();
        }
        Locale locale = SessionHelper.getLocaleByUser(request);
    %>
    <link href="static/css/custom/lantop/css/custom.css" type="text/css" rel="stylesheet">
    <jsp:include page="/avicit/platform6/component/common/EasyUIJsInclude.jsp"></jsp:include>
    <jsp:include page="/avicit/im/common/ImUIJSCSSInclude.jsp"></jsp:include>
    <jsp:include page="/avicit/platform6/modules/system/commonpopup/commonSelectionHead.jsp"></jsp:include>
    <script type="text/javascript"
            src="avicit/im/lantop/basic/archiveclassmanager/locale/language_<%=languageCode%>.js"></script>
    <script type="text/javascript"
            src="avicit/im/lantop/basic/archiveclassmanager/ArchiveclassmanagerManager.js"></script>
    <script type="text/javascript" src="static/js/platform/index/js/divscroll.js"></script>
    <title>档案分类树管理</title>
    <script type="text/javascript">
        sysId = "<%=request.getParameter("sysId")%>";
        menuCode = "<%=request.getParameter("menuCode")%>";
        $(document).ready(function () {
            $('#treeModelDiv').css('height', document.documentElement.clientHeight - 22);
            $("#treeDiv").perfectScrollbar();
        });

        function loadFrame() {
            $('#treeModelDiv').css('height', document.documentElement.clientHeight - 22);
        }

        $.extend($.fn.validatebox.defaults.rules, {
            xy: {
                validator: function (value, param) {
                    var jiedianName = $("#archiveClassNodeName").val();
                    var regEn = /[`~!@$%^&*+<>?:"{},.\;'[\]]/im,
                        regCn = /[·！￥：；“”‘，|《。》？\\\\【】[\]]/im;
                    if (regEn.test(jiedianName) || regCn.test(jiedianName)) {
                        return false;
                    } else {
                        return true;
                    }
                },
                message: '节点名称不能含有特殊字符'
            }
        });

    </script>
    <style>
        body {
            font-family: 微软雅黑;
        }

        table input {
            width: 90%;
            height: 23px !important;
            background: white;
            border: 1px solid #dedede !important;
            border-radius: 3px;
            padding-left: 10px;
            margin-left: 10px;
            font-size: 12px !important;
        }

        #archiveClassNodeType input {
            width: auto;
            height: auto;
            float: left;
        }

        #archiveClassNodeType span {
            float: left;
            margin-top: 5px;
        }

        .searchbox {
            width: 218px !important;
        }
    </style>
</head>
<body class="easyui-layout" onresize="loadFrame()">
<%-- 分类树 --%>
<div id="treeDiv" region="west" border="true"
     data-options="split: false,title:'<%=PlatformLocalesJSTL
					.getBundleValue(
							"lantop.basicdatamanager.archiveClassTreeManager.classifyTree",
							"i18n.lantop", locale)%>', collapsible: true"
     style="width: 220px;border-right:1px solid #dedede;overflow-x:hidden;">
    <div id="ddd" class="eayui-layout" data-option="fit: true">
        <div id="treeToolBarDiv" region="north">
            <input id="searchNodeName" name="searchNodeName"
                   onkeydown="keyDownSearch()"></input>
        </div>
        <div id="treeModelDiv" region="center"
             style="">
            <ul id="treeModel" class="easyui-tree"></ul>
        </div>
    </div>
</div>
<div id="treeDetail" region="center" border="false"
     style="font-size: 12px">
    <div class="easyui-layout" data-options="fit:true">

        <div class="commont" region="center" border="false"
             style="height: 0; border: 0; overflow: hidden; margin-top: 10px;">

            <form id="treeDetailForm" method="post">
                <a style="margin-left: 10px;" id="addTree"
                   href="javascript:void(0)" class="easyui-linkbutton selbtn"
                   onclick="addTreeData();"> <img
                        src="avicit/im/lantop/common/search/image/icon_tool08_blue.png"><span
                        class="selbtc">添加</span></a> <a id="delTree" href="javascript:void(0)"
                                                        class="easyui-linkbutton selbtn" onclick="delTreeData();"> <img
                    src="avicit/im/lantop/common/search/image/icon_tool09_blue.png"><span
                    class="selbtc">删除</span></a>
                <!-- <a id="copyTree" href="javascript:void(0)" class="easyui-linkbutton selbtn" onclick="copyTreeData();">
            <img src="avicit/im/lantop/common/search/image/icon_tool29_blue.png">复制</a>
            <a id="pasteTree" href="javascript:void(0)" class="easyui-linkbutton selbtn" onclick="pasteTreeData();">
            <img src="avicit/im/lantop/common/search/image/icon_tool234_blue.png">粘贴</a> -->
                <a id="sortTree" href="javascript:void(0)"
                   class="easyui-linkbutton selbtn" onclick="orderTreeData();"> <img
                        src="avicit/im/lantop/common/search/image/icon_tool235_blue.png"><span
                        class="selbtc">排序</span>
                </a>
                <a id="move" href="javascript:void(0)"
                   class="easyui-linkbutton selbtn" onclick="move();"> <img
                        src="avicit/im/lantop/common/search/image/icon_tool235_blue.png"><span
                        class="selbtc">迁移</span>
                </a>

                <table class="form_commonTable"
                       style="border-collapse: separate; border-spacing: 0px 10px; margin: 0 auto; width: 98%;">
                    <tr>
                        <sec:accesscontrollist hasPermission="3"
                                               domainObject="archiveclassmanager_archiveclassmanagerManager_archiveClassNodeName">
                            <%-- 节点名称 --%>
                            <td width="10%" align="right" style="text-align: right"><span
                                    style="color: red;" class="remind">*</span><%=PlatformLocalesJSTL
                                    .getBundleValue(
                                            "lantop.basicdatamanager.archiveClassTreeManager.nodeName",
                                            "i18n.lantop", locale)%>
                            </td>
                            <td width="40%"><input class="easyui-validatebox"
                                                   data-options="required: true" validType="xy[0,200]"
                                                   validType="length[0,200]"
                                                   title="<%=PlatformLocalesJSTL
						.getBundleValue(
								"lantop.basicdatamanager.archiveClassTreeManager.nodeName",
								"i18n.lantop", locale)%>"
                                                   type="text" name="archiveClassNodeName"
                                                   id="archiveClassNodeName"/> <input class="easyui-validatebox"
                                                                                      title="父节点ID" type="text"
                                                                                      name="parentId" id="parentId"
                                                                                      style="display: none"></td>
                        </sec:accesscontrollist>
                        <sec:accesscontrollist hasPermission="3"
                                               domainObject="archiveclassmanager_archiveclassmanagerManager_archiveClassNodeType">
                            <%-- 节点类型 --%>
                            <td width="10%" align="right" style="text-align: right"><%=PlatformLocalesJSTL
                                    .getBundleValue(
                                            "lantop.basicdatamanager.archiveClassTreeManager.nodeType",
                                            "i18n.lantop", locale)%>
                            </td>
                            <td width="40%">
                                <div id="archiveClassNodeType"></div>
                            </td>
                        </sec:accesscontrollist>
                    </tr>
                    <tr>
                        <sec:accesscontrollist hasPermission="3"
                                               domainObject="archiveclassmanager_archiveclassmanagerManager_nodeSortNumber">
                            <%-- 节点顺序 --%>
                            <td width="10%" align="right" style="text-align: right"><span
                                    class="remind" style="color: red;">*</span><%=PlatformLocalesJSTL
                                    .getBundleValue(
                                            "lantop.basicdatamanager.archiveClassTreeManager.nodeOrder",
                                            "i18n.lantop", locale)%>
                            </td>
                            <td width="40%"><input class="easyui-numberbox"
                                                   data-options="required: true" onblur="check();"
                                                   validType="length[0,1000]"
                                                   title="<%=PlatformLocalesJSTL
						.getBundleValue(
								"lantop.basicdatamanager.archiveClassTreeManager.nodeOrder",
								"i18n.lantop", locale)%>"
                                                   type="text" name="nodeSortNumber" id="nodeSortNumber"/></td>
                        </sec:accesscontrollist>
                        <sec:accesscontrollist hasPermission="3"
                                               domainObject="archiveclassmanager_archiveclassmanagerManager_archiveClassNodePath">
                            <%-- 节点路径 --%>
                            <td width="10%" align="right" style="text-align: right"><%=PlatformLocalesJSTL
                                    .getBundleValue(
                                            "lantop.basicdatamanager.archiveClassTreeManager.nodePath",
                                            "i18n.lantop", locale)%>
                            </td>
                            <td width="40%" class="input-readonly"><input
                                    class="easyui-validatebox input-readonly" readonly
                                    title="<%=PlatformLocalesJSTL
						.getBundleValue(
								"lantop.basicdatamanager.archiveClassTreeManager.nodePath",
								"i18n.lantop", locale)%>"
                                    type="text" validType="length[0,4000]"
                                    name="archiveClassNodePath" id="archiveClassNodePath"/></td>
                        </sec:accesscontrollist>
                    </tr>
                    <tr>
                        <sec:accesscontrollist hasPermission="3"
                                               domainObject="archiveclassmanager_archiveclassmanagerManager_nodePath">
                            <%-- 节点ID --%>
                            <td width="10%" align="right" style="text-align: right"><%=PlatformLocalesJSTL
                                    .getBundleValue(
                                            "lantop.basicdatamanager.archiveClassTreeManager.nodeID",
                                            "i18n.lantop", locale)%>
                            </td>
                            <td width="40%" class="input-readonly"><input
                                    class="easyui-validatebox input-readonly" readonly
                                    title="<%=PlatformLocalesJSTL
						.getBundleValue(
								"lantop.basicdatamanager.archiveClassTreeManager.nodeID",
								"i18n.lantop", locale)%>"
                                    type="text" name="id" id="id"/></td>
                        </sec:accesscontrollist>
                        <sec:accesscontrollist hasPermission="3"
                                               domainObject="archiveclassmanager_archiveclassmanagerManager_nodePath">
                            <%-- （最大）表名 --%>
                            <td width="12%" align="right" style="text-align: right"><%=PlatformLocalesJSTL
                                    .getBundleValue(
                                            "lantop.basicdatamanager.archiveClassTreeManager.(max)tableName",
                                            "i18n.lantop", locale)%>
                            </td>
                            <td width="40%" class="input-readonly"><input
                                    class="easyui-validatebox input-readonly" readonly
                                    title="<%=PlatformLocalesJSTL
						.getBundleValue(
								"lantop.basicdatamanager.archiveClassTreeManager.(max)tableName",
								"i18n.lantop", locale)%>"
                                    type="text" name="maxTableName" id="maxTableName"/></td>
                        </sec:accesscontrollist>
                    </tr>
                    <tr>
                        <sec:accesscontrollist hasPermission="3"
                                               domainObject="archiveclassmanager_archiveclassmanagerManager_createBy">
                            <%-- 创建人 --%>
                            <td width="10%" align="right" style="text-align: right"><%=PlatformLocalesJSTL
                                    .getBundleValue(
                                            "lantop.basicdatamanager.archiveClassTreeManager.buildName",
                                            "i18n.lantop", locale)%>
                            </td>
                            <td width="40%" class="input-readonly"><input
                                    class="easyui-validatebox input-readonly" readonly
                                    title="<%=PlatformLocalesJSTL
						.getBundleValue(
								"lantop.basicdatamanager.archiveClassTreeManager.buildName",
								"i18n.lantop", locale)%>"
                                    type="text" name="createdByName" id="createdByName"/></td>
                        </sec:accesscontrollist>
                        <sec:accesscontrollist hasPermission="3"
                                               domainObject="archiveclassmanager_archiveclassmanagerManager_creationDate">
                            <%-- 创建时间 --%>
                            <td width="10%" align="right" style="text-align: right"><%=PlatformLocalesJSTL
                                    .getBundleValue(
                                            "lantop.basicdatamanager.archiveClassTreeManager.buildTime",
                                            "i18n.lantop", locale)%>
                            </td>
                            <td class="input-readonly"><input
                                    class="easyui-validatebox input-readonly" readonly
                                    title="<%=PlatformLocalesJSTL
						.getBundleValue(
								"lantop.basicdatamanager.archiveClassTreeManager.buildTime",
								"i18n.lantop", locale)%>"
                                    type="text" name="creationDate" id="creationDate"/></td>
                        </sec:accesscontrollist>
                    </tr>
                    <tr>
                        <sec:accesscontrollist hasPermission="3"
                                               domainObject="archiveclassmanager_archiveclassmanagerManager_relatWorkflow">
                            <%-- 流程名称 --%>
                            <td width="10%" align="right" style="text-align: right"><%=PlatformLocalesJSTL
                                    .getBundleValue(
                                            "lantop.basicdatamanager.archiveClassTreeManager.flowName",
                                            "i18n.lantop", locale)%>
                            </td>
                            <td width="40%" class="input-readonly"><input
                                    class="easyui-validatebox input-readonly" readonly
                                    title="<%=PlatformLocalesJSTL
						.getBundleValue(
								"lantop.basicdatamanager.archiveClassTreeManager.flowName",
								"i18n.lantop", locale)%>"
                                    type="text" validType="length[0,4000]" name="relatWorkflow"
                                    id="relatWorkflow"/></td>
                        </sec:accesscontrollist>
                        <sec:accesscontrollist hasPermission="3"
                                               domainObject="archiveclassmanager_archiveclassmanagerManager_remark">
                            <%-- 仅部门可见 --%>
                            <td width="10%" align="right" id="onlyDeptSeeTh"
                                style="text-align: right">仅部门可见
                            </td>
                            <td width="40%" id="onlyDeptSeeTd" style="display: none;">
                                <input title="仅部门可见" type="checkbox" class='radiobox'
                                       id="onlyDeptSee"/> <input type="hidden" name="attribute01"
                                                                 id="attribute01">
                            </td>
                        </sec:accesscontrollist>
                    </tr>
                    <tr>
                        <sec:accesscontrollist hasPermission="3"
                                               domainObject="archiveclassmanager_archiveclassmanagerManager_remark">
                            <%-- 备注 --%>
                            <td width="10%" align="right" style="text-align: right"><%=PlatformLocalesJSTL
                                    .getBundleValue(
                                            "lantop.basicdatamanager.archiveClassTreeManager.comment",
                                            "i18n.lantop", locale)%>
                            </td>
                            <td width="40%" colspan="3"><textarea class="textareabox"
                                                                  validType="length[0,4000]"
                                                                  title="<%=PlatformLocalesJSTL
						.getBundleValue(
								"lantop.basicdatamanager.archiveClassTreeManager.comment",
								"i18n.lantop", locale)%>"
                                                                  type="text" name="remark" id="remark"
                                                                  validType="length[0,4000]"
                                                                  style="width: 95%; border-radius: 3px; height: 100px; margin-left: 10px;"></textarea>
                            </td>
                        </sec:accesscontrollist>
                    </tr>
                </table>
            </form>
        </div>
        <div align="center" style="padding: 10px 0;"
             data-options="region:'south',border:false">
            <div>
                <%-- 保存 --%>
                <a style="margin-right: 10px;"
                   class="easyui-linkbutton primary-btn selbtn" id="saveButton"
                   onclick="saveData();" href="javascript:void(0);"> <img
                        src="avicit/im/lantop/common/search/image/icon_tool10_blue.png"><span
                        class="selbtc"><%=PlatformLocalesJSTL
                        .getBundleValue(
                                "lantop.basicdatamanager.archiveClassTreeManager.button.save",
                                "i18n.lantop", locale)%></span></a>
                <%-- 重置 --%>
                <a style="display: none;" class="easyui-linkbutton selbtn" id="resetButton"
                   onclick="resetData();" href="javascript:void(0);"> <img
                        src="avicit/im/lantop/common/search/image/icon_tool039_blue.png"><span
                        class="selbtc"><%=PlatformLocalesJSTL
                        .getBundleValue(
                                "lantop.basicdatamanager.archiveClassTreeManager.button.reset",
                                "i18n.lantop", locale)%></span></a>
            </div>
        </div>
    </div>
</div>
<div id="treeMenu" class="easyui-menu" style="width: 120px;">
    <%-- 添加 --%>
    <div id="addTreeDataMenu" iconCls="icon-im-add"
         onclick="addTreeData()"><%=PlatformLocalesJSTL.getBundleValue(
            "lantop.basicdatamanager.archiveClassTreeManager.add",
            "i18n.lantop", locale)%>
    </div>
    <div id="addTreeDataMenuSep" class="menu-sep"></div>
    <%-- 删除 --%>
    <div id="deleteTreeDataMenu" onclick="delTreeData();"
         iconCls="icon-im-remove"><%=PlatformLocalesJSTL.getBundleValue(
            "lantop.basicdatamanager.archiveClassTreeManager.delete",
            "i18n.lantop", locale)%>
    </div>
    <div id="deleteTreeDataMenuSep" class="menu-sep"></div>
    <%-- 复制 --%>
    <div id="copyTreeDataMenu" onclick="copyTreeData();"
         iconCls="icon-im-copy"><%=PlatformLocalesJSTL.getBundleValue(
            "lantop.basicdatamanager.archiveClassTreeManager.copy",
            "i18n.lantop", locale)%>
    </div>
    <div id="copyTreeDataMenuSep" class="menu-sep"></div>
    <%-- 粘贴 --%>
    <div id="pasteTreeDataMenu" onclick="pasteTreeData();"
         iconCls="icon-im-paste"><%=PlatformLocalesJSTL.getBundleValue(
            "lantop.basicdatamanager.archiveClassTreeManager.paste",
            "i18n.lantop", locale)%>
    </div>
    <div id="pasteTreeDataMenuSep" class="menu-sep"></div>
    <%-- 排序 --%>
    <div id="orderTreeDataMenu" onclick="orderTreeData();"
         iconCls="icon-im-newncustomsort"><%=PlatformLocalesJSTL.getBundleValue(
            "lantop.basicdatamanager.archiveClassTreeManager.sort",
            "i18n.lantop", locale)%>
    </div>
</div>


<%--迁移节点树选择--%>
<div id="movedialog" class="easyui-dialog" title="选择节点" style="width:800px;height:500px;"
     data-options="closed:true,closable:true,resizable:true,collapsible:false,inline:true,modal:true,shadow : false">
    <div id="treeModelDiv1" region="center"
         style="">
        <ul id="treeModel1" class="easyui-tree"></ul>
    </div>
    <div style="height: 40px;text-align: center;width:100%;position: absolute;bottom: 0px;">
        <%--保存 --%>
        <a id="saveButton1" class="easyui-linkbutton selbtnc" data-options="iconCls:'icon-im-save'"
           style="margin-right:20px;"
           onclick="saveMove();" href="javascript:void(0);">保存</a> <a
            id="editButton1" style="display: none;margin-right:20px;"
            class="easyui-linkbutton selbtnc" data-options="iconCls:'icon-im-save'" onclick="editTaskForm();"
            href="javascript:void(0);">保存</a>
        <%--返回 --%>
        <a id="backButton" class="easyui-linkbutton selbtnc" data-options="iconCls:'icon-im-back'"
           onclick="closeWindow();" href="javascript:void(0);">取消</a>
    </div>
</div>
</body>
</html>